<template>
  <div>
    <el-card class="box-card" shadow="always">
      <div slot="header" :class="$style.clearfix">
        <span>商品手动调价管理</span>
      </div>
      <manual-price-header-form
        @onQuery="queryGoodsList"
        :querying="querying"
        :cellularList="cellularList"
        :topChannelList="topChannelList"
        ref="manualPrice"
      ></manual-price-header-form>
      <el-divider></el-divider>
      <el-button type="warning" @click="onOpenImportModal()">单次调价</el-button>
      <el-button type="primary" @click="onAdjustPriceByRange">分时段调价</el-button>
      <el-button type="success" @click="exportGoodsPrice" :loading="exporting">导出价格信息</el-button>
    </el-card>
    <el-card class="box-card" shadow="always">
      <manual-price-list-table
        v-bind="list"
        @pageSizeChange="pageSizeChange"
        @pageNumChange="pageNumChange"
        @onOpenGoodsDetailModal="onOpenGoodsDetailModal"
      />
    </el-card>
    <!--  导入对话框  -->
    <import-goods-price-modal :visible="importVisible" @close="onCloseImportModal" :topChannelList="topChannelList" />
    <goods-detail-modal
      :visible="goodsDetailVisible"
      :goods="goodsDetail"
      :competeStoreNames="competeStoreNames"
      @close="onCloseGoodsDetailModal"
    ></goods-detail-modal>
    <manual-price-adjust-price-by-range-modal
      v-bind="adjustPriceByRangeModalProps"
      @ok="onAdjustPriceByRangeModalOK"
      @close="onAdjustPriceByRangeModalClose"
    />
  </div>
</template>

<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index.js';
export default Index;
</script>
